<?php
if (!defined('IN_WONDERSHARE'))
{
	die('Hacking attempt');
}
class adModule 
{
	var $db;
	function __construct()
	{
		$this->db = $GLOBALS['db'];
	}
	   
	function get_ad_info($sql)
	{ 
		$date = array();
		$result = $this->db->query($sql);
		while($row = $this->db->fetch_array($result))
		{
			$date[] = $row;
		}
		return  $date;
	}
	   
	function  change_info($sql)
	{
		$affect = $this->db->query($sql);
		return  $affect;
	}
	   
	function  getOne($sql)
	{
		$one = $this->db->getOne($sql);
		return  $one ? $one : '';
	}
}

?>